package book.ch9;

import javax.swing.*;
import java.awt.*;

class MyFrame2 extends JFrame{
    public MyFrame2(){
        setBounds(100,100,700,800);
        setTitle("面板功能展示");




        setVisible(true);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    }
}

class MyPanel extends JPanel{
    public void paint(Graphics g){
        g.setColor(new Color(0x54fa));
        g.fillOval(100,100,100,100);

    }
}

public class PanelShow{

    public static void main(String[] args) {

        MyFrame2 win1=new MyFrame2();
        MyPanel panel=new MyPanel();
        win1.add(panel);







    }


}